package com.bbs.web.controller;

import com.bbs.domain.Reply;
import com.bbs.service.ReplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @ClassName ReplyController
 * @Description TODO
 * @Author chen hong wei
 * @Date 2019/9/22 22:46
 */
@RestController
@RequestMapping("/web/reply")
public class ReplyController {

    @Autowired
    private ReplyService replyService;

    @GetMapping("/findReplyByCommentId")
    public List<Reply> findReplyByCommentId(Integer commentid) {
        //健壮判端
        if (commentid <= 0) {
            return null;
        }

        List<Reply> replyList = replyService.findReplyByCommentId(commentid);
        return replyList;

    }


}